<%@ page language="java" contentType="text/html; charset=UTF-8"
	import="java.util.List,com.skyline.jfs.cluster.model.JFSNode"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JFS Cluster Status</title>
<%
	List<JFSNode> clusterNodes = (List<JFSNode>) request
			.getAttribute("clusterNodes");
%>
</head>
<body>
<table>
	<tr>
		<td width="240" valign="top"><%@ include file="../adminNavi.jsp"%>
		</td>
		<td valign="top">
		<table>
			<tr bgcolor='#a1a1a1'>
				<td>ID</td>
				<td>Name</td>
				<td>Admin</td>
				<td>IP</td>
				<td>Total Space</td>
				<td>Usable Space</td>
				<td>Usable Space Percent</td>
				<td>Loadbalancing Factor</td>
				<td>Storage Dirctory</td>
				<td>Description</td>
				<td>Activity</td>
			</tr>
			<%
				for (int i = 0; i < clusterNodes.size(); i++) {
					JFSNode node = clusterNodes.get(i);
					out.println("<tr>");
					out.println("<td>" + node.getId() + "</td>");
					out.println("<td>" + node.getName() + "</td>");
					out.println("<td>" + node.getAdminiJobNum() + "</td>");
					out.println("<td>" + node.getIp() + "</td>");
					out.println("<td>" + Float.valueOf(node.getTotalSpace()) / 1024
							/ 1024 / 1024 + " GB</td>");
					out.println("<td>" + Float.valueOf(node.getUsableSpace())
							/ 1024 / 1024 / 1024 + " GB</td>");
					out.println("<td>" + (Float.valueOf(node.getUsableSpace())/Float.valueOf(node.getTotalSpace())*100) + "%</td>");
					out.println("<td>" + node.getLoadbalancingFactor() + "</td>");
					out.println("<td>" + node.getStorageDirctory() + "</td>");
					out.println("<td>" + node.getDescription() + "</td>");
					out.println("<td>" + node.getActivity() + "</td>");
					out.println("</tr>");
				}
			%>
		</table>
		</td>
	</tr>
</table>
</body>
</html>